<template>
  <el-select :value="defaultValue" @change="handleChange">
    <el-option v-for="{name,id} in options" :key="id" :value="id" :label="name" />
  </el-select>
</template>

<script>
  export default {
    name: 'ApplicationScenario',
    props: {
      defaultValue: { type: String, required: false, default: '' }
    },
    data() {
      return {
        options: []
      }
    },
    methods: {
      handleChange(value) {
        this.$emit('change', this.options.find(option => option.id === value))
      }
    }
  }
</script>

<style scoped lang="scss"></style>
